package com.z.jdbc_demo;

public class Student {
    // 数据库用下划线，到了Java需要使用驼峰
    // stu_id -> stuId
    private Integer stuId;
    private String stuName;
    private Double stuScore;
    private Integer stuAge;

    // 生成构造方法
    public Student() {
    }
    public Student(Integer stuId, String stuName, Double stuScore, Integer stuAge) {
        this.stuId = stuId;
        this.stuName = stuName;
        this.stuScore = stuScore;
        this.stuAge = stuAge;
    }

    // 生成 Getter/Setter 方法
    public Integer getStuId() {
        return stuId;
    }

    public void setStuId(Integer stuId) {
        this.stuId = stuId;
    }

    public String getStuName() {
        return stuName;
    }

    public void setStuName(String stuName) {
        this.stuName = stuName;
    }

    public Double getStuScore() {
        return stuScore;
    }

    public void setStuScore(Double stuScore) {
        this.stuScore = stuScore;
    }

    public Integer getStuAge() {
        return stuAge;
    }

    public void setStuAge(Integer stuAge) {
        this.stuAge = stuAge;
    }

    // 生成 toString 方法
    @Override
    public String toString() {
        return "Student{" +
                "stuId=" + stuId +
                ", stuName='" + stuName + '\'' +
                ", stuScore=" + stuScore +
                ", stuAge=" + stuAge +
                '}';
    }
}
